import React,{Component} from 'react';


class InputControlES6 extends React.Component{

   constructor(props){
   		super(props);

   		this.state = {
   			text:'placeholder'
   		};

   		this.handleChange = this.handleChange.bind(this);
   }

   handleChange(event){
   		this.setState({
   			text:event.target.value
   		});
   		console.log(InputControlES6.propTypes);
   }

   render(){
   		return (
   			<div>
   				Type something:
   				<input onChange={this.handleChange}
   				value={this.state.text}/>
   			</div>
   			);
   }
}

InputControlES6.propTypes = {   //这是什么意思
	initialValue: React.PropTypes.string
};
InputControlES6.defaultProps = {
	initialValue: ''
};

export default InputControlES6
